$('#write').click(function(){
    layer.msg('写卡中', {icon: 1});
    var measureId = $('#measureId').val();
    if(measureId==''){
        layer.msg('计量单号不存在，请确认业务', {icon: 2});
        return false;
    }
    $.ajax({
        url: '/measure-write/'+measureId,
        async : false,
        success:function(data){
            layer.msg('写卡成功',{time:30*1000});
            init();
            $('#write').addClass("disabled");
            $('#incollection').removeClass("disabled");
            $('#source').hide();
        }
    })
})